#include<stdio.h>
int main()
{

    bool game(int x,int y);
    int x,y;
    while(1)
    {
        scanf("%d%d",&x,&y);
        if(x==0&&y==0) break;
        if(game(x,y)) printf("Stan wins\n");
        else printf("Ollie wins\n");
    }
    return 0;
}

bool game(int x,int y)
{
    int temp;
    if(x<y)
    {
        temp=x;
        x=y;
        y=temp;
    }
    if(x%y==0) return 1;
    else if(x-y<y) return !game(x-y,y);
    return 1;

}
